import request from '@/utils/request'

// 查询随访列表列表
export function listFollow(query) {
  return request({
    url: '/research/follow/list',
    method: 'get',
    params: query
  })
}

// 查询随访列表详细
export function getFollow(followId) {
  return request({
    url: '/research/follow/' + followId,
    method: 'get'
  })
}

// 新增随访列表
export function addFollow(data) {
  return request({
    url: '/research/follow',
    method: 'post',
    data: data
  })
}

// 修改随访列表
export function updateFollow(data) {
  return request({
    url: '/research/follow',
    method: 'put',
    data: data
  })
}

// 批量修改随访列表
export function updateFollowBatch(data) {
  return request({
    url: '/research/follow/updateBatch',
    method: 'post',
    data: data
  })
}

// 删除随访列表
export function delFollow(followId) {
  return request({
    url: '/research/follow/' + followId,
    method: 'delete'
  })
}

/**
 * 待随访数量
 */
export function getToFollowCount() {
  return request({
    url: '/research/follow/toFollowCount',
    method: 'get'
  })
}

/**
 * 待随访日历
 */
export function statisticFollow() {
  return request({
    url: '/research/follow/statisticFollow',
    method: 'get'
  })
}
